let str = "abcdefg";
console.log(str.charCodeAt(0), str.charCodeAt(3)); // 97 100
console.log(str.charCodeAt(-2)); // NaN
